how to check whether a triangle is valid or not if three sides are given